package com.bruce.aidemo.demos.controller;

import com.bruce.aidemo.service.ImageRecognitionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("image")
public class ImageRecognitionController {
    @Autowired
    private ImageRecognitionService imageRecognitionService;

    @GetMapping("/recognize")
    public String recognizeImage(@RequestParam String imageUrl) {
        return imageRecognitionService.recognizeImage(imageUrl);
    }
}
